package com.tomcov.shared;

import java.io.Serializable;
import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class Message implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
	private String id;
	
	@Persistent public String From;
	@Persistent public String To;
	@Persistent public String date;
	@Persistent public String message;
	@Persistent public String deleteto;
	@Persistent public String deletefrom;
	
	public Message(){
	}
	
	public Message(String From,String To,String message, String date){
		this.date=date;
		this.From=From;
		this.To=To;
		this.message=message;
		deletefrom="false";
		deleteto="false";
	}
	
	/**
	 * Gets the from.
	 *
	 * @return the from
	 */
	public String getFrom() {
		return From;
	}
	
	/**
	 * Sets the from.
	 *
	 * @param from the new from
	 */
	public void setFrom(String from) {
		From = from;
	}
	/**
	 * @return To
	 */
	public String getTo() {
		return To;
	}
	/**
	 * @param to
	 */
	public void setTo(String to) {
		To = to;
	}
	/**
	 * @return date
	 */
	public String getDate() {
		return date;
	}
	/**
	 * @param date
	 */
	public void setDate(String date) {
		this.date = date;
	}
	/**
	 * @return message
	 */
	public String getMessage() {
		return message;
	}
	/**
	 * @param message
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * @return unique id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @return deleteto
	 */
	public String getDeleteto() {
		return deleteto;
	}

	/**
	 * @param deleteto
	 */
	public void setDeleteto(String deleteto) {
		this.deleteto = deleteto;
	}

	/**
	 * @return deletefrom
	 */
	public String getDeletefrom() {
		return deletefrom;
	}

	/**
	 * @param deletefrom
	 */
	public void setDeletefrom(String deletefrom) {
		this.deletefrom = deletefrom;
	}

}
